local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system {
    'git',
    'clone',
    '--filter=blob:none',
    'https://github.com/folke/lazy.nvim.git',
    '--branch=stable', -- latest stable release
    lazypath,
  }
end
vim.opt.rtp:prepend(lazypath)


require('lazy').setup(
{
  { -- LSP Configuration & Plugins
    'neovim/nvim-lspconfig',
    dependencies = {
      -- Automatically install LSPs to stdpath for neovim
      { 'williamboman/mason.nvim', config = true },
      'williamboman/mason-lspconfig.nvim',

      -- Useful status updates for LSP
      -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
      { 'j-hui/fidget.nvim', opts = {} },

      -- Additional lua configuration, makes nvim stuff amazing!
      'folke/neodev.nvim',
    },
  },

  { -- Autocompletion
    'hrsh7th/nvim-cmp',
    dependencies = { 'hrsh7th/cmp-nvim-lsp', 
                     'L3MON4D3/LuaSnip', 
                     'saadparwaiz1/cmp_luasnip',
                     'hrsh7th/cmp-path',
                     "hrsh7th/cmp-cmdline",
                     "hrsh7th/cmp-buffer",
                   },
  },

  -- Autopairs
  {
      'windwp/nvim-autopairs',
  },

  -- Backgound transparent
  { 'xiyaowong/transparent.nvim' },

  -- Power text editing
  { 'mg979/vim-visual-multi' },

  -- Telescope
  {
    'nvim-telescope/telescope.nvim', tag = '0.1.1',
     dependencies = { 'nvim-lua/plenary.nvim' }
  },

  -- "gc" to comment visual regions/lines
  { 'numToStr/Comment.nvim', opts = {} },

  -- Tabs

  { 'akinsho/bufferline.nvim' ,
     dependencies = {'nvim-tree/nvim-web-devicons'}
  },

  -- nvim-tree
  { 'nvim-tree/nvim-tree.lua' },

  -- terminal
  {'akinsho/toggleterm.nvim', version = "*", config = true},

  -- Theme
  { "catppuccin/nvim", name = "catppuccin" },

  -- Show color codes
  { "norcalli/nvim-colorizer.lua", opts = {'*'; '!vim';} }, 

  -- Lualine
  {
    "nvim-lualine/lualine.nvim",
     dependecies = { 'nvim-tree/nvim-web-devicons' }
  },

}, {})
